﻿using System;
using fastCSharp;

namespace diantou.web.ajax
{
    /// <summary>
    /// 回答操作
    /// </summary>
    [fastCSharp.code.cSharp.ajax(IsPool = true)]
    class answer : userHandle<answer>
    {
        /// <summary>
        /// 删除回答
        /// </summary>
        /// <param name="id"></param>
        /// <param name="onReturn"></param>
        public void Delete(int id, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            diantou.dataAccess.tcpCall.answer.delete(id, currentUser.Id, onReturn);
        }
        /// <summary>
        /// 保存回答草稿
        /// </summary>
        /// <param name="value"></param>
        /// <param name="onReturn"></param>
        public void SaveDraft(diantou.dataAccess.answer value, Action<fastCSharp.net.returnValue<bool>> onReturn)
        {
            value.UserId = currentUser.Id;
            diantou.dataAccess.tcpCall.answer.saveDraft(value, onReturn);
        }
    }
}
